# Copyright (C) 2010 Jaakko Vuori
#
# This file is part of Cimer.
# For more information, see <http://code.google.com/p/cimer/>
#
# Cimer is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Cimer is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Cimer.  If not, see <http://www.gnu.org/licenses/>.

TARGET = cimer
TEMPLATE = app
DESTDIR = ../bin
SOURCES += main.cpp \
    cimerwindow.cpp \
    piewidget.cpp \
    screensaverpreventer.cpp \
    keyeventhandler.cpp \
    feedbackplayer.cpp

HEADERS += cimerwindow.h \
    piewidget.h \
    screensaverpreventer.h \
    keyeventhandler.h \
    feedbackplayer.h

FORMS += cimerwindow.ui
RC_FILE = cimer.rc

CONFIG += mobility
MOBILITY += feedback

symbian {
    DEFINES += FEEDBACK_EFFECTS
    SOURCES += screensaverpreventer_symbian.cpp
    HEADERS += screensaverpreventer_symbian.h

    ICON = cimer_symbian.svg
    # Deploy the sound files
    soundFiles.sources = timeout.wav
    DEPLOYMENT += soundFiles
    TARGET.EPOCSTACKSIZE = 0x14000
    TARGET.EPOCHEAPSIZE = 0x020000 0x1000000

    TARGET.UID3 = 0xA89FAD02 #Correct
    TARGET.CAPABILITY = "None"
} else {

    unix {
        DEFINES += NO_SOUND
        maemo*: {
            SOURCES += screensaverpreventer_maemo.cpp
            HEADERS += screensaverpreventer_maemo.h
            QT += dbus

            OTHER_FILES += cimer.desktop

            PREFIX = /usr
            BINDIR = $$PREFIX/bin
            DATADIR = $$PREFIX/share

            DEFINES += DATADIR=\"$$DATADIR\" PKGDATADIR=\"$$PKGDATADIR\"

            target.path = $$BINDIR

            desktop.path = $$DATADIR/applications/hildon
            desktop.files += cimer.desktop

            icon64.path = $$DATADIR/icons/hicolor/64x64/apps
            icon64.files += icons/64x64/cimer.png

            INSTALLS += target desktop icon64

        } else {
            SOURCES += screensaverpreventer_linux.cpp
            HEADERS += screensaverpreventer_linux.h
            LIBS += -lXss -lX11 -lXtst
        }
    }
    win32 {
        SOURCES += screensaverpreventer_win.cpp
        HEADERS += screensaverpreventer_win.h
    }
}
